package in.muton.panels.paginator.components.listitems;

import in.muton.edushare.pages.EduShareBasePage;
import in.muton.edushare.pages.batch.BatchPeople;
import in.muton.edushare.pages.common.EdusharePanel;
import in.muton.edushare.pages.curricula.CurriculaSummary;
import in.muton.edushare.url.EntityPageParams;
import in.muton.panels.paginator.badgehelpers.course.BatchBadgeInterface;
import in.muton.panels.paginator.helpers.deletelinks.BatchDelete;
import in.muton.panels.paginator.helpers.links.BatchNameLink;

import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

import com.edushare.common.vo.Batches;
import com.edushare.common.vo.Curricula;

public class BatchListItem extends EdusharePanel {
	public BatchListItem(String id, EduShareBasePage page,
			IModel<Batches> model, BatchBadgeInterface bif) {
		super(id, page);
		add(new BatchNameLink("nameLink", model, "name"));
		add(new BookmarkablePageLink<Void>("curr", CurriculaSummary.class,
				EntityPageParams.getParams(new Model<Curricula>(model
						.getObject().getCurricula()))));
		add(new BookmarkablePageLink<Void>("people", BatchPeople.class,
				EntityPageParams.getParams(model)));
		add(new BatchDelete("delete", bif, model, this));
	}

	private static final long serialVersionUID = 8213979559080008251L;
}
